<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<table class="t_css" width="100%" border="0" cellpadding="0"
       cellspacing="1" id="fundInfo_before">
    <col style="width:20%"/>
    <col style="width:20%"/>
    <col style="width:20%"/>
    <col style="width:40%"/>

    <!-- 	<tr><th colspan="5" style="text-align:left;" >资金支出预算</th></tr> -->
    <tr class=" t_tr">
        <td  align="center" >资金支出预算</td>
        <td class=" TblHead" align="center" >预算金额</td>
        <td class=" TblHead" align="center" >其中：省财政拨款</td>
        <td class=" TblHead" align="center">备注</td>
    </tr>
    <tr>
        <td  style="text-align:left;" ><strong>一、直接费用</strong></td>
        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal100" id="total_subtotal100"
                   onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;" disabled  label="直接费用-->预算金额"  class="gray"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal100" />"
            />
        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_directall" id="total_directall"
                   class="gray" disabled  label="其中：省财政拨款"  onfocus="InitInput.setNumber(this,9,2,0)"
                   style="text-align:right; width:80%;"
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_directall" />"
            />
        </td>
        <td align="center">
            <input type="text" style="width:80%" name="budget/invest_detail/invest[00]/total_allot" id="total_allot_0"
                   label="直接费用-->备注" class="gray" disabled = "disabled"  maxlength="50"
                   value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='00']/total_allot" />" />
        </td>

    </tr>



    <tr>
        <td align="left" style="">&nbsp;&nbsp;&nbsp;1、设备费 </td>
        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal4" id="total_subtotal4"
                   onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;"  disabled="disabled" label="直接费用-->设备费-->预算金额"  class="gray irisValGreatEqual:total_subtotal4:total_facility"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal4" />"
            />

        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_facility" disabled="disabled" class="gray" label="直接费用-->设备费-->其中：省财政拨款"
                   onfocus="InitInput.setNumber(this,9,2,0)" label="直接费用-->设备费-->其中：省财政拨款"
                   style="text-align:right; width:80%;"
                   id="total_facility"
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_facility" />"

            />
        </td>
        <%-- <td align="center">
            <input type="text" style="text-align:left;width:80%" name="budget/invest_detail_before/kechuang/allot_facility"
                    label="设备费-->省财政拨款-->备注" id="allot_facility"  maxlength="50" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/allot_facility" />"
            />
        </td> --%>
        <td align="center">
            <input type="hidden" name="budget/invest_detail_before/invest[0]@seq" value="1" />
            <input type="text" style="text-align:left;width:80%" name="budget/invest_detail_before/invest[0]/total_allot"
                   label="直接费用-->设备费-->备注" id="total_allot_10"  maxlength="50" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/invest[@seq=1]/total_allot" />"
            />
        </td>
    </tr>
    <tr>
        <td align="left" style="padding-left:40px">(1)购置设备费</td>
        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal5" id="total_subtotal5"
                   onfocus="InitInput.setNumber(this,9,2,0)"  style="text-align:right; width:80%;" label="直接费用-->设备费-->购置设备费-->预算金额" class="valueGreatEqual:total_subtotal5:total_purchase"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal5" />"
                   onchange="
				    countFundAuto('total_','subtotal1,subtotal2,subtotal3,subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal16,subtotal18,subtotal19,subtotal20','subtotal17');
				    countFundAuto('total_','subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal1,subtotal18','subtotal100');
				   countFundAuto('total_','subtotal5,subtotal6,subtotal18','subtotal4');
				    "
            />
        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_purchase" id="total_purchase"
                   label="直接费用-->设备费-->购置设备费-->其中：省财政拨款"  style="text-align:right; width:80%;"
                   onfocus="InitInput.setNumber(this,9,2,0)" class=""
                   onchange="
				    countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,change','directall');


				   countFundAuto('total_','purchase,make,change','facility');


				 countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,indirect,change,performance,other','gross');
				 "
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_purchase" />"  />
            <!-- countFundAuto('total_','invest_11,purchase','subtotal5');
            countFundAuto('total_','invest_11,invest_12,invest_30,purchase,make,change','subtotal4');
              countFundAuto('total_','invest_7,invest_9,invest_11,invest_12,invest_13,invest_14,invest_15,invest_16,invest_17,invest_18,invest_19,invest_20,invest_21,invest_30,labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,change','subtotal100');changedisplay(); -->
        </td>
        <%-- <td align="center">
            <input type="text" style="text-align:left;width:80%" name="budget/invest_detail_before/kechuang/allot_purchase" id="allot_purchase"
                    label="设备费-->购置费-->省财政拨款-->备注"  maxlength="50" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/allot_purchase" />"
            />
        </td> --%>
        <td align="center">
            <input type="hidden" name="budget/invest_detail_before/invest[1]@seq" value="2" />
            <input type="text" style="text-align:left;width:80%" id="total_allot_11"  name="budget/invest_detail_before/invest[1]/total_allot"
                   label="直接费用-->设备费-->购置设备费-->备注"  maxlength="50" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/invest[@seq=2]/total_allot" />"
            />
        </td>
    </tr>
    <tr>
        <td align="left" style="padding-left:40px">(2)自制设备费</td>
        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal6" id="total_subtotal6"
                   onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;" label="直接费用-->设备费-->自制设备费-->预算金额"   class="valueGreatEqual:total_subtotal6:total_make"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal6" />"
                   onchange="
					countFundAuto('total_','subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal1,subtotal18','subtotal100');
				   countFundAuto('total_','subtotal5,subtotal6,subtotal18','subtotal4');
				    countFundAuto('total_','subtotal1,subtotal2,subtotal3,subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal16,subtotal18,subtotal19,subtotal20','subtotal17');"
            />
        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_make" id="total_make"
                   label="直接费用-->设备费-->自制设备费-->其中：省财政拨款"  style="text-align:right; width:80%;"
                   onfocus="InitInput.setNumber(this,9,2,0)" class=""
                   onchange="
				    countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,change','directall');

				   countFundAuto('total_','purchase,make,change','facility');


				 countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,indirect,change,performance,other','gross');
				 "
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_make" />"  />
            <!--countFundAuto('total_','invest_12,make','subtotal6');  -->
        </td>
        <td align="center">
            <input type="hidden" name="budget/invest_detail_before/invest[2]@seq" value="3" />
            <input type="text" style="text-align:left;width:80%" id="total_allot_12"  name="budget/invest_detail_before/invest[2]/total_allot"
                   maxlength="50" label="直接费用-->设备费-->自制设备费-->备注" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/invest[@seq=3]/total_allot" />"
            />
        </td>
    </tr>
    <!--新增  -->
    <tr>
        <td align="left" style="padding-left:40px">(3)设备改造与租赁</td>
        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal18" id="total_subtotal18"
                   onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;" label="直接费用-->设备费-->设备改造与租赁--预算金额"   class="valueGreatEqual:total_subtotal18:total_change"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal18" />"
                   onchange="
				    countFundAuto('total_','subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal1,subtotal18','subtotal100');
				   countFundAuto('total_','subtotal5,subtotal6,subtotal18','subtotal4');
				    countFundAuto('total_','subtotal1,subtotal2,subtotal3,subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal16,subtotal18,subtotal19,subtotal20','subtotal17');"
            />
        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_change" id="total_change"
                   label="直接费用-->设备费-->设备改造与租赁-->其中：省财政拨款"  style="text-align:right; width:80%;"
                   onfocus="InitInput.setNumber(this,9,2,0)" class=""
                   onchange="
				     countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,change','directall');


				   countFundAuto('total_','purchase,make,change','facility');


				 countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,indirect,change,performance,other','gross');
				 "
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_change" />"  />
            <!--countFundAuto('total_','invest_30,change','subtotal18');  -->

        </td>
        <td align="center">
            <input type="hidden" name="budget/invest_detail_before/invest[3]@seq" value="4" />
            <input type="text" style="text-align:left;width:80%" id="total_allot_30"  name="budget/invest_detail_before/invest[3]/total_allot"
                   maxlength="50" label="直接费用-->设备费-->设备改造与租赁-->备注" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/invest[@seq=4]/total_allot" />"
            />
        </td>

    </tr>

    <tr>
        <td align="left" style="">&nbsp;&nbsp;&nbsp;2、材料费 </td>
        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal7" id="total_subtotal7"
                   onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;" label="直接费用-->材料费-->预算金额"   class="valueGreatEqual:total_subtotal7:total_stuffs"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal7" />"
                   onchange="
				     countFundAuto('total_','subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal1,subtotal18','subtotal100');
				    countFundAuto('total_','subtotal1,subtotal2,subtotal3,subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal16,subtotal18,subtotal19,subtotal20','subtotal17');"
            />
        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_stuffs" id="total_stuffs"
                   label="直接费用-->材料费-->其中：省财政拨款"  style="text-align:right; width:80%;"
                   onfocus="InitInput.setNumber(this,9,2,0)" class=""
                   onchange="
				    countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,change','directall');



				countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,indirect,change,performance,other','gross');
				"
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_stuffs" />"  />
            <!-- countFundAuto('total_','invest_13,stuffs','subtotal7');  -->
        </td>
        <%-- 	<td align="center">
                <input type="text" style="text-align:left;width:80%" name="budget/invest_detail_before/kechuang/allot_stuffs" id="allot_stuffs"
                        label="材料费-->省财政拨款-->备注"  maxlength="50" class=""
                       value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/allot_stuffs" />"
                />
            </td> --%>
        <td align="center">
            <input type="hidden" name="budget/invest_detail_before/invest[4]@seq" value="5" />
            <input type="text" style="text-align:left;width:80%" id="total_allot_13"  name="budget/invest_detail_before/invest[4]/total_allot"
                   maxlength="50" label="直接费用-->材料费-->备注" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/invest[@seq=5]/total_allot" />"
            />
        </td>
    </tr>

    <tr>
        <td align="left" style="">&nbsp;&nbsp;&nbsp;3、测试化验加工费 </td>
        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal9" id="total_subtotal9"
                   onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;" label="直接费用-->测试化验加工费-->预算金额"   class="valueGreatEqual:total_subtotal9:total_test"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal9" />"
                   onchange="
				     countFundAuto('total_','subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal1,subtotal18','subtotal100');
				    countFundAuto('total_','subtotal1,subtotal2,subtotal3,subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal16,subtotal18,subtotal19,subtotal20','subtotal17');"
            />
        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_test" id="total_test"
                   label="直接费用-->测试化验加工费-->其中：省财政拨款"  style="text-align:right; width:80%;"
                   onfocus="InitInput.setNumber(this,9,2,0)" class=""
                   onchange="
				        countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,change','directall');


				 countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,indirect,change,performance,other','gross');
				 "
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_test" />"  />
            <!-- countFundAuto('total_','invest_15,test','subtotal9');  -->
        </td>
        <%-- <td align="center">
            <input type="text" style="text-align:left;width:80%" name="budget/invest_detail_before/kechuang/allot_test" id="allot_test"
                    label="测试化验加工费-->省财政拨款-->备注"  maxlength="50" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/allot_test" />"
            />
        </td> --%>
        <td align="center">
            <input type="hidden" name="budget/invest_detail_before/invest[5]@seq" value="6" />
            <input type="text" style="text-align:left;width:80%" id="total_allot_15"  name="budget/invest_detail_before/invest[5]/total_allot"
                   maxlength="50" label="直接费用-->测试化验加工费-->备注" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/invest[@seq=6]/total_allot" />"
            />
        </td>
    </tr>
    <tr>
        <td align="left" style="">&nbsp;&nbsp;&nbsp;4、燃料动力费</td>
        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal8" id="total_subtotal8"
                   onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;" label="直接费用-->燃料动力费-->预算金额"   class="valueGreatEqual:total_subtotal8:total_fuel"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal8" />"
                   onchange="
				     countFundAuto('total_','subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal1,subtotal18','subtotal100');
				    countFundAuto('total_','subtotal1,subtotal2,subtotal3,subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal16,subtotal18,subtotal19,subtotal20','subtotal17');"
            />
        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_fuel" id="total_fuel"
                   label="直接费用-->燃料动力费-->其中：省财政拨款"  style="text-align:right; width:80%;"
                   onfocus="InitInput.setNumber(this,9,2,0)" class=""
                   onchange="
				        countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,change','directall');


				 countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,indirect,change,performance,other','gross');
				 "
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_fuel" />"  />
            <!-- countFundAuto('total_','invest_14,fuel','subtotal8'); -->
        </td>
        <%-- <td align="center">
            <input type="text" style="text-align:left;width:80%" name="budget/invest_detail_before/kechuang/allot_fuel" id="allot_fuel"
                    label="燃料动力费-->省财政拨款-->备注"  maxlength="50" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/allot_fuel" />"
            />
        </td> --%>
        <td align="center">
            <input type="hidden" name="budget/invest_detail_before/invest[6]@seq" value="7" />
            <input type="text" style="text-align:left;width:80%" id="total_allot_14"  name="budget/invest_detail_before/invest[6]/total_allot"
                   maxlength="50" label="直接费用-->燃料动力费-->备注 " class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/invest[@seq=7]/total_allot" />"
            />
        </td>
    </tr>



    <tr>
        <td align="left" style="">&nbsp;&nbsp;&nbsp;5、差旅费/会议费/国际合作与交流费</td>
        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal10" id="total_subtotal10"
                   onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;" label="直接费用-->差旅费/会议费/国际合作与交流费-->预算金额"   class="valueGreatEqual:total_subtotal10:total_travelling"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal10" />"
                   onchange="
				     countFundAuto('total_','subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal1,subtotal18','subtotal100');
				    countFundAuto('total_','subtotal1,subtotal2,subtotal3,subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal16,subtotal18,subtotal19,subtotal20','subtotal17');"
            />
        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_travelling" id="total_travelling"
                   label="直接费用-->差旅费/会议费/国际合作与交流费-->其中：省财政拨款"  style="text-align:right; width:80%;"
                   onfocus="InitInput.setNumber(this,9,2,0)" class=""
                   onchange="
				    countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,change','directall');


                    countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,indirect,change,performance,other','gross');


				   countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,change','directall');"
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_travelling" />"  />
            <!--countFundAuto('total_','invest_16,travelling','subtotal10');  -->
        </td>
        <td align="center">
            <input type="hidden" name="budget/invest_detail_before/invest[7]@seq" value="8" />
            <input type="text" style="text-align:left;width:80%" id="total_allot_16"  name="budget/invest_detail_before/invest[7]/total_allot"
                   maxlength="50" label="直接费用-->差旅费/会议费/国际合作与交流费-->备注" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/invest[@seq=8]/total_allot" />"
            />
        </td>
    </tr>
    <tr>
        <td align="left" style="">&nbsp;&nbsp;&nbsp;6、信息费（出版/文献/信息传播/知识产权事物费） </td>
        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal13" id="total_subtotal13"
                   onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;" label="直接费用-->信息费（出版/文献/信息传播/知识产权事物费）-->预算金额"   class="valueGreatEqual:total_subtotal13:total_science"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal13" />"
                   onchange="
				     countFundAuto('total_','subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal1,subtotal18','subtotal100');
				    countFundAuto('total_','subtotal1,subtotal2,subtotal3,subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal16,subtotal18,subtotal19,subtotal20','subtotal17');"
            />
        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_science" id="total_science"
                   label="直接费用-->信息费（出版/文献/信息传播/知识产权事物费）-->其中：省财政拨款"  style="text-align:right; width:80%;"
                   onfocus="InitInput.setNumber(this,9,2,0)" class=""
                   onchange="
				    countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,change','directall');


				 countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,indirect,change,performance,other','gross');
				"
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_science" />"  />
            <!-- countFundAuto('total_','invest_20,science','subtotal13');  -->
        </td>
        <%-- <td align="center">
            <input type="text" style="text-align:left;width:80%" name="budget/invest_detail_before/kechuang/allot_science" id="allot_science"
                    label="出版/文献/信息传播/知识产权事务费-->省财政拨款-->备注"  maxlength="50" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/allot_science" />"
            />
        </td> --%>
        <td align="center">
            <input type="hidden" name="budget/invest_detail_before/invest[8]@seq" value="9" />
            <input type="text" style="text-align:left;width:80%" id="total_allot_20"  name="budget/invest_detail_before/invest[8]/total_allot"
                   maxlength="50" label="直接费用-->信息费（出版/文献/信息传播/知识产权事物费）-->备注" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/invest[@seq=9]/total_allot" />"
            />
        </td>
    </tr>

    <tr>
        <td align="left" style="">&nbsp;&nbsp;&nbsp;7、专家咨询费 </td>
        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal14" id="total_subtotal14"
                   onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;" label="直接费用-->专家咨询费-->预算金额"   class="valueGreatEqual:total_subtotal14:total_advisory"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal14" />"
                   onchange="
				     countFundAuto('total_','subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal1,subtotal18','subtotal100');
				    countFundAuto('total_','subtotal1,subtotal2,subtotal3,subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal16,subtotal18,subtotal19,subtotal20','subtotal17');"
            />
        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_advisory" id="total_advisory"
                   label="直接费用-->专家咨询费-->其中：省财政拨款"  style="text-align:right; width:80%;"
                   onfocus="InitInput.setNumber(this,9,2,0)" class=""
                   onchange="
				    countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,change','directall');


				 countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,indirect,change,performance,other','gross');
				 "
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_advisory" />"  />
            <!--  countFundAuto('total_','invest_19,advisory','subtotal14');  -->
        </td>
        <%-- <td align="center">
            <input type="text" style="text-align:left;width:80%" name="budget/invest_detail_before/kechuang/allot_advisory" id="allot_advisory"
                    label="专家咨询费-->省财政拨款-->备注"  maxlength="50" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/allot_advisory" />"
            />
        </td> --%>
        <td align="center">
            <input type="hidden" name="budget/invest_detail_before/invest[9]@seq" value="10" />
            <input type="text" style="text-align:left;width:80%" id="total_allot_19"  name="budget/invest_detail_before/invest[9]/total_allot"
                   maxlength="50" label="直接费用-->专家咨询费-->备注" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/invest[@seq=10]/total_allot" />"

            />
        </td>
    </tr>
    <tr>
        <td align="left" style="">&nbsp;&nbsp;&nbsp;8、劳务费</td>
        <td align="center">
            <input type="text" name="budget/invest_detail_before/subtotal1" id="total_subtotal1"
                   onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;" label="直接费用-->劳务费-->预算金额"   class="valueGreatEqual:total_subtotal1:total_labour"
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/subtotal1" />"
                   onchange="
				     countFundAuto('total_','subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal1,subtotal18','subtotal100');
				    countFundAuto('total_','subtotal1,subtotal2,subtotal3,subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal16,subtotal18,subtotal19,subtotal20','subtotal17');"
            />

        </td>
        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_labour" id="total_labour"
                   class=""   label="直接费用-->劳务费-->其中：省财政拨款"  style="text-align:right; width:80%;"
                   onfocus="InitInput.setNumber(this,9,2,0)"
                   onchange="
				      countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,change','directall');


				countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,indirect,change,performance,other','gross');
				"
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_labour" />"  />
            <!--  countFundAuto('total_','labour,invest_7','subtotal1');  -->
        </td>

        <td align="center">
            <input type="hidden" name="budget/invest_detail_before/invest[10]@seq" value="11" />
            <input type="text" style="text-align:left;width:80%" name="budget/invest_detail_before/invest[10]/total_allot" id="total_allot_7"
                   label="直接费用-->劳务费-->备注"  maxlength="50" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/invest[@seq=11]/total_allot" />"
            />
        </td>
    </tr>
    <tr>
        <td align="left" style="">&nbsp;&nbsp;&nbsp;9、其他支出 </td>
        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal15" id="total_subtotal15"
                   onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;" label="直接费用-->其他支出-->预算金额"   class="valueGreatEqual:total_subtotal15:total_direct"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal15" />"
                   onchange="
				     countFundAuto('total_','subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal1,subtotal18','subtotal100');
				    countFundAuto('total_','subtotal1,subtotal2,subtotal3,subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal16,subtotal18,subtotal19,subtotal20','subtotal17');"
            />
        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_direct" id="total_direct"
                   label="直接费用-->其他支出-->其中：省财政拨款"  style="text-align:right; width:80%;"
                   onfocus="InitInput.setNumber(this,9,2,0)" class=""
                   onchange="
				    countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,change','directall');


				 countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,indirect,change,performance,other','gross');
				 "
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_direct" />"  />
            <!--countFundAuto('total_','invest_21,direct','subtotal15');  -->
        </td>
        <%-- <td align="center">
            <input type="text" style="text-align:left;width:80%" name="budget/invest_detail_before/kechuang/allot_direct" id="allot_direct"
                    label="其他支出-->省财政拨款-->备注"  maxlength="50" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/allot_direct" />"
            />
        </td> --%>
        <td align="center">
            <input type="hidden" name="budget/invest_detail_before/invest[11]@seq" value="12" />
            <input type="text" style="text-align:left;width:80%" id="total_allot_21"  name="budget/invest_detail_before/invest[11]/total_allot"
                   maxlength="50" label="直接费用-->其他支出-->备注" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/invest[@seq=12]/total_allot" />"
            />
        </td>
    </tr>
    <tr>
        <td  style="text-align:left;" ><strong>二、间接费用</strong></td>

        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal101" id="total_subtotal101"
                   onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;"  disabled="disabled" label="间接费用-->预算金额"   class="gray"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal101" />"
            />
        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_directall1" id="total_directall1"
                   class="gray"  disabled label="其中：省财政拨款"  onfocus="InitInput.setNumber(this,9,2,0)"
                   style="text-align:right; width:80%;"
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_directall1" />"
            />
        </td>

        <td align="center">
            <input type="text" style="width:80%;"   name="budget/invest_detail/invest[15]/total_allot"
                   maxlength="50" label="间接费用-->备注"
                   class="gray" disabled = "disabled"
                   value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='15']/total_allot" />"/>
        </td>


    </tr>
    <tr>
        <td align="left" style="">&nbsp;&nbsp;&nbsp;1、管理费</td>
        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal16" id="total_subtotal16"
                   onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;" label="间接费用-->管理费-->预算金额"   class="valueGreatEqual:total_subtotal16:total_indirect"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal16" />"
                   onchange="
				   countFundAuto('total_','subtotal16,subtotal19,subtotal20','subtotal101');
				   countFundAuto('total_','subtotal1,subtotal2,subtotal3,subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal16,subtotal18,subtotal19,subtotal20','subtotal17');"
            />
        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_indirect" id="total_indirect"
                   label="间接费用-->管理费-->其中：省财政拨款"  style="text-align:right; width:80%;"
                   onfocus="InitInput.setNumber(this,9,2,0)" class=""
                   onchange="
				   countFundAuto('total_','indirect,performance,other','directall1');


				 countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,indirect,change,performance,other','gross');
				"
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_indirect" />"  />
            <!-- countFundAuto('total_','invest_22,indirect','subtotal16');  -->
        </td>

        <td align="center">
            <input type="hidden" name="budget/invest_detail_before/invest[12]@seq" value="13" />
            <input type="text" style="text-align:left;width:80%" id="total_allot_22"  name="budget/invest_detail_before/invest[12]/total_allot"
                   maxlength="50" label="间接费用-->管理费-->备注" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/invest[@seq=13]/total_allot" />"
            />
        </td>
    </tr>
    <!--新增  -->
    <tr>
        <td align="left" style="">&nbsp;&nbsp;&nbsp;2、绩效支出</td>
        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal19" id="total_subtotal19"
                   onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;" label="间接费用-->绩效支出-->预算金额"   class="valueGreatEqual:total_subtotal19:total_performance"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal19" />"
                   onchange="
				   countFundAuto('total_','subtotal16,subtotal19,subtotal20','subtotal101');
				   countFundAuto('total_','subtotal1,subtotal2,subtotal3,subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal16,subtotal18,subtotal19,subtotal20','subtotal17');"
            />
        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_performance" id="total_performance"
                   label="间接费用-->绩效支出-->其中：省财政拨款"  style="text-align:right; width:80%;"
                   onfocus="InitInput.setNumber(this,9,2,0)" class=""
                   onchange="
				   countFundAuto('total_','indirect,performance,other','directall1');


				 countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,indirect,change,performance,other','gross');
				"
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_performance" />"  />
            <!--countFundAuto('total_','invest_31,performance','subtotal19');  -->
        </td>

        <td align="center">
            <input type="hidden" name="budget/invest_detail_before/invest[13]@seq" value="14" />
            <input type="text" style="text-align:left;width:80%" id="total_allot_31"  name="budget/invest_detail_before/invest[13]/total_allot"
                   maxlength="50" label="间接费用-->绩效支出-->备注" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/invest[@seq=14]/total_allot" />"
            />
        </td>
    </tr>

    <tr>
        <td align="left" style="">&nbsp;&nbsp;&nbsp;3、其他</td>
        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal20" id="total_subtotal20"
                   onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;" label="间接费用-->其他-->预算金额"   class="valueGreatEqual:total_subtotal20:total_other"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal20" />"
                   onchange="
				   countFundAuto('total_','subtotal16,subtotal19,subtotal20','subtotal101');
				   countFundAuto('total_','subtotal1,subtotal2,subtotal3,subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal16,subtotal18,subtotal19,subtotal20','subtotal17');"
            />
        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_other" id="total_other"
                   label="间接费用-->其他-->其中：省财政拨款"  style="text-align:right; width:80%;"
                   onfocus="InitInput.setNumber(this,9,2,0)" class=""
                   onchange="
				   countFundAuto('total_','indirect,performance,other','directall1');


				 countFundAuto('total_','labour,main,purchase,make,stuffs,fuel,test,travelling,meeting,international,science,advisory,direct,indirect,change,performance,other','gross');
				"
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_other" />"  />
            <!--countFundAuto('total_','invest_31,performance','subtotal19');  -->
        </td>
        <td align="center">
            <input type="hidden" name="budget/invest_detail_before/invest[14]@seq" value="15" />
            <input type="text" style="text-align:left;width:80%" id="total_allot_32"  name="budget/invest_detail_before/invest[14]/total_allot"
                   maxlength="50" label="间接费用-->其他-->备注" class=""
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/invest[@seq=15]/total_allot" />"
            />
        </td>
    </tr>






    <tr>
        <td align="center" ><strong>支出合计</strong></td>
        <td align="center">
            <input type="text" name="budget/invest_deta/subtotal17" id="total_subtotal17"
                   class="gray"  disabled onfocus="InitInput.setNumber(this,9,2,0)" style="text-align:right; width:80%;" label="支出合计-->预算金额"
                   value="<x:out select="$xmlData/data/budget/invest_deta/subtotal17" />" />
        </td>

        <td align="center">
            <input type="text" name="budget/invest_detail_before/kechuang/total_gross" id="total_gross"
                   class="gray" disabled label="支出合计-->其中：省财政拨款"  onfocus="InitInput.setNumber(this,9,2,0)"
                   style="text-align:right; width:80%;"
                   value="<x:out select="$xmlData/data/budget/invest_detail_before/kechuang/total_gross" />"
            />
        </td>
        <td align="center">
            <input type="text" style="width:80%;"   name="budget/invest_detail/invest[18]/total_allot"
                   maxlength="50" label="资金支出预算-->支出合计-->备注" class="gray" disabled="disabled"
                   value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='18']/total_allot" />"/>
        </td>

    </tr>
</table>
<br/>
<script type="text/javascript">

    /**
     * 将值以千分位显示
     * @param value 数值
     */
    function thousandsNumber(value) {
        if (value == null || value == undefined || value == "") {
            return "";
        }
        var negative = '';
        var intVal = value.split(".")[0];
        var j = intVal.length;
        if(intVal.charAt(0) == '-'){
            negative = '-';
            intVal = intVal.substr(1, j);
        }
        j = intVal.length;
        for(var i=j-3; i>0; i=i-3){
            intVal = intVal.substr(0, i) + "," + intVal.substr(i, j);
        }
        if(value.split(".")[1] != null){
            return (negative + intVal + '.' + value.split(".")[1]);
        } else{
            return (negative + intVal);
        }
    }
    function countFundAuto2(idStart, countStr, totalStr) {
        var indexs = countStr.split(",");
        var count = 0;
        for ( var i = 0; i < indexs.length; i++) {
            var fund = $("#" + indexs[i] + idStart ).val();
            if (!$.isNumeric(fund))
                fund = "0";
            count = ((parseFloat(count)*10000 + parseFloat(fund)*10000)/10000).toFixed(4);
        }

        //count = formatNumberAuto(count.toString(), 9, 2, 0);// 格式化金额
        $("#"  + totalStr + idStart).val(count);
    }
    function countFundA() {
        var total_2017= $("#total_2017_subtotal").val();
        var total_2018= $("#total_2018_subtotal").val();
        var total_2019= $("#total_2019_subtotal").val();
        if(!$.isNumeric(total_2017)){
            total_2017=0;
        }
        if(!$.isNumeric(total_2018)){
            total_2018=0;
        }
        if(!$.isNumeric(total_2019)){
            total_2019=0;
        }
        var total= accAdd(total_2017,total_2018);
        var total1=accAdd(total_2019,total);
        //total1 = formatNumberAuto(total1.toString(), 9, 2, 0);// 格式化金额
        $("#total_subtotal").val(total1);
        /* 		$("#total_all").val(total1); */
    }

    function request_amt(){
        var ss=$("#total_subtotal").val();
        $("#request_amt1").text(ss);
    }
    function changedisplay(){
        var total_subtotal5=$("#total_subtotal4").val();
        if(!!total_subtotal5){
            if(parseFloat(total_subtotal5)>0){
                $("#color_span").css("display","inline");
                return true;
            }else{
                $("#color_span").css("display", "none");
                return false;
            }
        }else{
            $("#color_span").css("display", "none");
        }

    }
    $(document).ready(function(){
        changedisplay();
        countFundAuto('total_','subtotal1,subtotal2,subtotal3,subtotal5,subtotal6,subtotal7,subtotal8,subtotal9,subtotal10,subtotal11,subtotal12,subtotal13,subtotal14,subtotal15,subtotal16,subtotal18,subtotal19,subtotal20','subtotal17');
    });


    function irisValGreatEqual(str1, str2, msg) {
        var val1 = $("#" + changeString(str1)).val();
        var val2 = $("#" + changeString(str2)).val();
        if(val1 && val1!="") val1 = val1.replace(",","");
        if(val2 && val2!="") val2 = val2.replace(",","");
        if (val1 == "")
            minvalue = 0;
        if (val2 == "")
            maxvalue = 0;
        if (parseFloat(val1) < parseFloat(val2)) {
            if (msg == "") {
                msg = strTitle + $("#" + changeString(str1)).attr("label") + "必须大于等于"
                    + $("#" + changeString(str2)).attr("label");
            }
            irisValaddMsg(msg);
            return false;
        }
        return true;
    }
</script>

